<template>
    <div class="index">
        首页
        <button @click="a">按钮</button>
    </div>
</template>

<script>
export default  {
    methods:{
        a(){
             this.$http.get("api/getimgcategory/")
              .then(function(result){
                if(result.body.status === 0){
                    console.log(result.body)
                    

                }else{
                    alert("error")
                }

                
            });
        }
    }
}
</script>

<style lang="less">
.index {
    padding: 0 20px 20px;
    box-sizing: border-box;
    h1,
    .text {
        text-align: left;
    }
    .footer {
        position: absolute;
        bottom: 0;
        left: 20px;
    }
    .btn {
        width: 100%;
        height: auto;
        color: #fff;
        background: #373737;
        margin: 10px 0 20px;
        padding: 15px;
        box-sizing: border-box;
        border-radius: 5px;
        font-size: 16px;
    }
}
</style>

